<template>
    <el-container>
        <el-header>Header</el-header>
        <el-container>
            <el-aside width="200px">
                <el-tree
                        :props="props"
                        :load="loadNode"
                        lazy
                        show-checkbox>
                </el-tree>
            </el-aside>
            <el-main>Main</el-main>
        </el-container>
    </el-container>
</template>

<script>
    export default {
        data() {
            return {
                props: {
                    label: 'name',
                    isLeaf: 'isleaf'
                },
            };
        },
        methods: {
            loadNode(node, resolve) {

                this.$axios.post("/server/schools/findSchools",this.$qstring.stringify({pid:node.id}))
                    .then(res=>{
                        resolve(res.data.data);
                    })
            }
        }
    };
</script>

<style scoped>

    .el-header {
        background-color: #B3C0D1;
        color: #333;
        text-align: center;
        line-height: 60px;
    }

    .el-aside {
        background-color: #D3DCE6;
        color: #333;
        text-align: center;
        line-height: 200px;
    }

    .el-main {
        background-color: #E9EEF3;
        color: #333;
        text-align: center;
        line-height: 570px;
    }


</style>